home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / CPP / METAKIT.ZIP / EXAMPLES / CATFISH / FINDDLG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-12-09  |  1.9 KB  |  78 lines

  1. //  finddlg.h  -  find dialog sample code
  2. //
  3. //  This is a part of the MetaKit library.
  4. //  Copyright (c) 1996 Meta Four Software.
  5. //  All rights reserved.
  6. /////////////////////////////////////////////////////////////////////////////
  7.  
  8. /////////////////////////////////////////////////////////////////////////////
  9. // This edit control catches some of the keys to avoid illegal filenames
  10.  
  11. class CMyEdit : public CEdit
  12. {
  13. public:
  14.     CMyEdit (bool f_ =false) : acceptDot (f_) { }
  15.     
  16. protected:
  17.     bool acceptDot;
  18.     
  19.     // Generated message map functions
  20.     //{{AFX_MSG(CMyEdit)
  21.     afx_msg void OnChar(UINT nChar, UINT nRep, UINT nFlags) ;
  22.     //}}AFX_MSG
  23.     DECLARE_MESSAGE_MAP()
  24. };
  25.  
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CFindDialog dialog
  28.  
  29. class CFindDialog : public CDialog
  30. {
  31. // Construction
  32. public:
  33.     CFindDialog(CWnd* pParent = NULL);  // standard constructor
  34.  
  35.     bool Execute(const char* name);
  36.     
  37. // Dialog Data
  38.     //{{AFX_DATA(CFindDialog)
  39.     enum { IDD = IDD_FIND_DIALOG };
  40.     CString m_maxDate;
  41.     CString m_minDate;
  42.     CString m_nameEdit;
  43.     BOOL    m_singleCat;
  44.     CString m_minSize;
  45.     CString m_maxSize;
  46.     //}}AFX_DATA
  47.     
  48.     bool NeedsCompare() const;
  49.     bool Match(const c4_RowRef& row_) const;
  50.     
  51. // Implementation
  52. private:
  53.     CMyEdit m_nameEditCtrl;
  54.     CString m_currCatName;
  55.  
  56.     bool m_checkName, m_checkDate, m_checkSize;
  57.     
  58.     CString m_upName;
  59.     int m_loDate;
  60.     int m_hiDate;
  61.     long m_loSize;
  62.     long m_hiSize;
  63.     
  64.     void FixCriteria();
  65.     
  66. protected:
  67.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  68.  
  69.     // Generated message map functions
  70.     //{{AFX_MSG(CFindDialog)
  71.     virtual BOOL OnInitDialog();
  72.     //}}AFX_MSG
  73.     DECLARE_MESSAGE_MAP()
  74. };
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // $Id: finddlg.h,v 1.2 1996/12/04 14:49:28 jcw Exp $
  78.